{"ast":null,"code":"import { useEffect, useRef } from 'react';\nexport default function useRemovePasswordTimeout(inputRef, triggerOnMount) {\n  var removePasswordTimeoutRef = useRef([]);\n  var removePasswordTimeout = function removePasswordTimeout() {\n    removePasswordTimeoutRef.current.push(setTimeout(function () {\n      var _a, _b, _c, _d;\n      if (((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) && ((_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.input.getAttribute('type')) === 'password' && ((_c = inputRef.current) === null || _c === void 0 ? void 0 : _c.input.hasAttribute('value'))) {\n        (_d = inputRef.current) === null || _d === void 0 ? void 0 : _d.input.removeAttribute('value');\n      }\n    }));\n  };\n  useEffect(function () {\n    if (triggerOnMount) {\n      removePasswordTimeout();\n    }\n    return function () {\n      return removePasswordTimeoutRef.current.forEach(function (timer) {\n        if (timer) {\n          clearTimeout(timer);\n        }\n      });\n    };\n  }, []);\n  return removePasswordTimeout;\n}","map":{"version":3,"names":["useEffect","useRef","useRemovePasswordTimeout","inputRef","triggerOnMount","removePasswordTimeoutRef","removePasswordTimeout","current","push","setTimeout","_a","_b","_c","_d","input","getAttribute","hasAttribute","removeAttribute","forEach","timer","clearTimeout"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/input/hooks/useRemovePasswordTimeout.js"],"sourcesContent":["import { useEffect, useRef } from 'react';\nexport default function useRemovePasswordTimeout(inputRef, triggerOnMount) {\n  const removePasswordTimeoutRef = useRef([]);\n  const removePasswordTimeout = () => {\n    removePasswordTimeoutRef.current.push(setTimeout(() => {\n      var _a, _b, _c, _d;\n      if (((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) && ((_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.input.getAttribute('type')) === 'password' && ((_c = inputRef.current) === null || _c === void 0 ? void 0 : _c.input.hasAttribute('value'))) {\n        (_d = inputRef.current) === null || _d === void 0 ? void 0 : _d.input.removeAttribute('value');\n      }\n    }));\n  };\n  useEffect(() => {\n    if (triggerOnMount) {\n      removePasswordTimeout();\n    }\n    return () => removePasswordTimeoutRef.current.forEach(timer => {\n      if (timer) {\n        clearTimeout(timer);\n      }\n    });\n  }, []);\n  return removePasswordTimeout;\n}"],"mappings":"AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,eAAe,SAASC,wBAAwB,CAACC,QAAQ,EAAEC,cAAc,EAAE;EACzE,IAAMC,wBAAwB,GAAGJ,MAAM,CAAC,EAAE,CAAC;EAC3C,IAAMK,qBAAqB,GAAG,SAAxBA,qBAAqB,GAAS;IAClCD,wBAAwB,CAACE,OAAO,CAACC,IAAI,CAACC,UAAU,CAAC,YAAM;MACrD,IAAIC,EAAE,EAAEC,EAAE,EAAEC,EAAE,EAAEC,EAAE;MAClB,IAAI,CAAC,CAACH,EAAE,GAAGP,QAAQ,CAACI,OAAO,MAAM,IAAI,IAAIG,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,EAAE,CAACI,KAAK,KAAK,CAAC,CAACH,EAAE,GAAGR,QAAQ,CAACI,OAAO,MAAM,IAAI,IAAII,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,EAAE,CAACG,KAAK,CAACC,YAAY,CAAC,MAAM,CAAC,MAAM,UAAU,KAAK,CAACH,EAAE,GAAGT,QAAQ,CAACI,OAAO,MAAM,IAAI,IAAIK,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,EAAE,CAACE,KAAK,CAACE,YAAY,CAAC,OAAO,CAAC,CAAC,EAAE;QAC3R,CAACH,EAAE,GAAGV,QAAQ,CAACI,OAAO,MAAM,IAAI,IAAIM,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,EAAE,CAACC,KAAK,CAACG,eAAe,CAAC,OAAO,CAAC;MAChG;IACF,CAAC,CAAC,CAAC;EACL,CAAC;EACDjB,SAAS,CAAC,YAAM;IACd,IAAII,cAAc,EAAE;MAClBE,qBAAqB,EAAE;IACzB;IACA,OAAO;MAAA,OAAMD,wBAAwB,CAACE,OAAO,CAACW,OAAO,CAAC,UAAAC,KAAK,EAAI;QAC7D,IAAIA,KAAK,EAAE;UACTC,YAAY,CAACD,KAAK,CAAC;QACrB;MACF,CAAC,CAAC;IAAA;EACJ,CAAC,EAAE,EAAE,CAAC;EACN,OAAOb,qBAAqB;AAC9B"},"metadata":{},"sourceType":"module"}